package com.google.gwt.sample.dynatablerf.server.dao;

import java.util.List;

import com.google.gwt.sample.dynatablerf.server.domain.AbstractEntity;
import com.google.gwt.sample.dynatablerf.server.domain.EntityQueryParams;

public interface IDAOManager<T extends AbstractEntity, G extends EntityQueryParams> {

	T persist(T entity);

	T findById(Long id);

	T find(G params);

	List<T> findAll(int startIndex, int maxResult);

	List<T> findAll(G params, int startIndex, int maxResult);

	Long count(G params);

	Long countAll();

	G getEmptyParams();
}
